/*
 * --------------------------------------------------------------
 * Copyright ©  2015 Hangzhou DtDream Technologies Co.,Ltd.
 * --------------------------------------------------------------
 *      Product: 协同数治
 *  Module Name: design
 * Date Created: 2023/2/9
 *  Description: TODO
 * --------------------------------------------------------------
 * Modification History
 * DATE            NAME            Description
 * --------------------------------------------------------------
 * 2023/2/9       yewj            TODO
 * --------------------------------------------------------------
 */

package com.dtdream.pattern.composite;

/**
 * TODO
 *
 * @Author: yewj
 **/
public class Cilent {
    public static void main(String[] args) {
        University university = new University("清华大学", "中国顶级大学");
        OrganizationComponent college1 = new College("计算机学院", "计算机");
        OrganizationComponent college2 = new College("信息工程学院", "软件");

        college1.add(new Department("软件工程1", "软件1"));
        college1.add(new Department("软件工程2", "软件2"));
        college1.add(new Department("软件工程3", "软件3"));

        college2.add(new Department("信息工程1", "信息1"));
        college2.add(new Department("信息工程2", "信息2"));

        university.add(college1);
        university.add(college2);

        university.print();

    }
}
